Next | Prev | Up | Top | Contents | Index

Compile Options, 32-Bit Kernel

The cc and ld options shown in Table 10-2 are needed to compile and link a kernel-level driver for a 32-bit kernel in IRIX 6.2.

Compiler Options for 32-Bit Kernel Modules
OptionPurpose
-non_shared Do not compile for shared libraries (dynamic linking).
-elf Compile and link an ELF binary.
-32 -mips2Create a 32-bit executable for the MIPS II architecture.
-G 8In a nonloadable driver, use the global table for objects up to 8 bytes.
-G 0In a loadable driver, do not use the global table. Refer to the gp_overflow(5) reference page for a discussion of the global table.
-O2 Maximum recommended optimization level.
-r Linker to retain symbols (needed by loadable drivers only).
-d Force definition of common storage even though -r used.
-Wc,-pic0 Do not allocate stack space used by shared objects.
-jalr Generate jalr instructions for subroutine calls rather than jal, which allows only a 26-bit target and so cannot address all kernel virtual storage.


Next | Prev | Up | Top | Contents | Index